package bean.task;

import dao.task.TaskDAO;
import entity.task.Task;

import java.util.List;

import javax.faces.bean.ManagedBean;
import javax.faces.bean.ViewScoped;
import javax.inject.Inject;

@ManagedBean
@ViewScoped
public class TaskListBean {
	
	@Inject
	private TaskDAO taskDAO;
	
	private List<Task> tasks;
	
	public List<Task> loadAllTasks() {
		 return taskDAO.findByCriteria();
	}

	public List<Task> getTasks() {
		return taskDAO.findByCriteria();
	}

	public void setTasks(List<Task> tasks) {
		this.tasks = tasks;
	}

}
